package com.quickdemo.mappers;

import com.github.pagehelper.Page;
import com.quickdemo.annotation.AutoFill;
import com.quickdemo.constant.OperationType;
import com.quickdemo.pojo.dto.UserPageQueryDTO;
import com.quickdemo.pojo.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    @AutoFill(OperationType.INSERT)
    void insert(User user);

    Page<User> pageQuery(UserPageQueryDTO userPageQueryDTO);

    User findById(Long id);

    void deleteById(Long id);

    void deleteByIds(List<Long> ids);

    @AutoFill(OperationType.UPDATE)
    void update(User user);
}
